package com.heima.service.impl;

import com.heima.mapper.ReportMapper;
import com.heima.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;


@Service
public class ReportServiceImpl implements ReportService {

    @Autowired
    private ReportMapper reportMapper;
    @Override
    public Long orderCount(String start,String end) {
        return reportMapper.orderCount(start, end);
    }

    @Override
    public BigDecimal orderAmount(String start, String end) {
        BigDecimal decimal = new BigDecimal(100);
        BigDecimal bigDecimal = reportMapper.orderAmount(start, end);
        //金额扩大100倍变成多少元
        return decimal.multiply(bigDecimal);
    }
}
